import 'package:flutter/material.dart';
import 'peopleBean.dart';

class BeanPage extends StatelessWidget {

  @override
  Widget build(BuildContext context) {

  PeopleBean  peopleBean =   ModalRoute.of(context).settings.arguments as PeopleBean;

    return Scaffold(

      appBar: AppBar(title: Text('传递Bean'),),

      body: Flex(

          direction: Axis.vertical,
          children: <Widget>[

            Text(peopleBean.name),
            Text(peopleBean.age),
          ],

      ),
    );
  }
}